package com.digital.smartgrow.service.expert.random;

import com.digital.smartgrow.entity.expert.Expert;
import lombok.Data;

/**
 * Created by SunYuechao on 2022/7/16 下午8:17
 */
@Data
public class RandomExpert {

    //ID
    private Integer id;
    //权重
    private Integer weight;

     RandomExpert(Expert expert){
       this.setId(expert.getId());
       //如果两个都选上，权重更大一些  (+1) 随机数范围不能都是0
       this.setWeight((expert.getIdWeight()+expert.getNameWeight())*100+1);
    }


}
